package com.example.demo517.controller;

import com.example.demo517.service.Classinfo_service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.demo517.entity.ClassInfo;
import java.util.List;

@RestController
@RequestMapping("/class")
@CrossOrigin
public class Classinfo_Controller {
    @Autowired
    private Classinfo_service classinfo_service;

    @GetMapping("/clsinfoall")
    public List<ClassInfo> findallClassinfo() {
        List<ClassInfo> classInfos = classinfo_service.findallClassInfo();
        return classInfos;
    }
    @GetMapping("list")
    public String getAllStudent(){
        return "";
    }

}
